import fetch from 'utils/fetch';
// 教师活跃度分页
export function pageTeacherActive(json) {
    const data = {...json};
    return fetch({
        url: '/active/pageTeacherActive',
        method: 'post',
        data
    });
}



// 统计教师浏览人数
export function getTeacherBrowseNum(schoolId, queryTime) {
    const data = {
        schoolId,
        queryTime
    };
    return fetch({
        url: '/homePage/getTeacherBrowseNum',
        method: 'post',
        data
    });
}

//统计上传素材和资源
export function countMaterialResourceAmount(schoolId, queryTime, resourceType) {
    const data = {
        schoolId,
        queryTime,
        resourceType
    };
    return fetch({
        url: '/homePage/countMaterialResourceAmount',
        method: 'post',
        data
    });
}

//统计教师上传资源排行
export function getTeacherResourceNumTop(schoolId, queryTime, resourceType) {
    const data = {
        schoolId,
        queryTime,
        resourceType
    };
    return fetch({
        url: '/homePage/getTeacherResourceNumTop',
        method: 'post',
        data
    });
}

//统计教师布置作业排行
export function getTeacherPublishNumTop(schoolId, queryTime) {
    const data = {
        schoolId,
        queryTime
    };
    return fetch({
        url: '/homePage/getTeacherPublishNumTop',
        method: 'post',
        data
    });
}

//根据学校id查询年级
export function getGradeBySchoolId(schoolId) {
    const data = {
        schoolId
    };
    return fetch({
        url: '/homePage/getGradeBySchoolId',
        method: 'post',
        data
    });
}

//统计作业布置量
export function countHomeworkArrangeAmount(schoolId, queryTime, gradeId) {
    const data = {
        schoolId,
        queryTime,
        gradeId
    };
    return fetch({
        url: '/homePage/countHomeworkArrangeAmount',
        method: 'post',
        data
    });
}